package com.dsj.gxrd.modules.activity.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsj.gxrd.modules.activity.domain.entity.RdPairing;
import com.dsj.gxrd.modules.activity.mapper.RdPairingMapper;
import com.dsj.gxrd.modules.activity.service.RdPairingService;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author songpin566
 * @date 2023/10/10
 **/
@Service
public class RdPairingServiceImpl extends ServiceImpl<RdPairingMapper, RdPairing> implements RdPairingService {

    @Autowired
    private RdPairingMapper rdPairingMapper;

    @Override
    public List<RdPairing> selectPairingList(RdPairing pairing) {
        return rdPairingMapper.selectPairingList(pairing);
    }

    @Override
    public boolean insertPairing(RdPairing pairing) {
        pairing.setDelFlag(0);
        return save(pairing);
    }

    @Override
    public boolean updatePairing(RdPairing pairing) {
        return updateById(pairing);
    }

    @Override
    public AjaxResult removes(List<Long> ids) {
        return removeBatchByIds(ids)?AjaxResult.success("删除成功"):AjaxResult.error();
    }

}
